package com.slz3.business.module.goodsManagement.gooBrand.steward;

import com.slz3.business.module.goodsManagement.gooBrand.domain.GooBrand;
import com.slz3.business.module.goodsManagement.gooBrand.domain.GooBrandCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;
@Component
public class GooBrandResponse {

    @Resource
    private GooBrandResController gooBrandResController;


    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(GooBrand.class).flatMap(gooBrand ->
                gooBrandResController.add(req, gooBrand)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(GooBrandCondition.class).flatMap(gooBrandCondition ->
                gooBrandResController.delete(req, gooBrandCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(GooBrand.class).flatMap(gooBrand ->
                gooBrandResController.modify(req, gooBrand)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return gooBrandResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return gooBrandResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return gooBrandResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(GooBrandCondition.class).flatMap(gooBrandCondition ->
                gooBrandResController.auditSubmit(req, gooBrandCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(GooBrandCondition.class).flatMap(gooBrandCondition ->
                gooBrandResController.audit(req, gooBrandCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(GooBrandCondition.class).flatMap(gooBrandCondition ->
                gooBrandResController.auditReject(req, gooBrandCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(GooBrandCondition.class).flatMap(gooBrandCondition ->
                gooBrandResController.usingEnable(req, gooBrandCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(GooBrandCondition.class).flatMap(gooBrandCondition ->
                gooBrandResController.usingDisable(req, gooBrandCondition)
        );
    }   

}
